package edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseController;

import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseDao.HumidityDAO;
import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseEntity.HumidityData;
import edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseService.HumidityDataService;
import edu.ynu.se.xiecheng.achitectureclass.common.controller.LogicController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "土壤数据-湿度数据管理")
@RestController
@RequestMapping("/humidity")
public class HumidityDataController extends LogicController<HumidityDataService, HumidityDAO, HumidityData,Long> {

    public HumidityDataController(HumidityDataService service) {
        super(service);
    }


    //自定义api
    @GetMapping("/get")

    @ApiOperation(value = "通过ID获取土壤检测数据", notes = "根据土壤检测数据ID获取土壤检测数据")

    public HumidityData GET(@RequestParam Long id) {

        return service.GET(id);

    }
}
